﻿<phone:PhoneApplicationPage
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Payton_WP7_ViewModel="clr-namespace:Payton.WP7.ViewModel"
    x:Class="Payton.WP7.Views.AboutView"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"
    Orientation="Portrait"
    mc:Ignorable="d"
    d:DesignHeight="768"
    d:DesignWidth="480"
    d:DataContext="{d:DesignData /SampleData/AboutViewModelSampleData.xaml}"
    shell:SystemTray.IsVisible="True">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid
        x:Name="LayoutRoot"
        Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition
                Height="Auto" />
            <RowDefinition
                Height="*" />
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel
            x:Name="TitlePanel"
            Grid.Row="0"
            Margin="12,17,0,28">
            <TextBlock
                x:Name="ApplicationTitle"
                Style="{StaticResource PhoneTextNormalStyle}"><Run
                    Text="About" /><LineBreak /><Run /></TextBlock>
            <TextBlock
                x:Name="PageTitle"
                Text="Weibo+"
                Margin="0"
                Style="{StaticResource PhoneTextTitle1Style}" />
            <TextBlock
                x:Name="PageContent"
                Text="这是个统一的微博管理客户端. 她集成了 Sina, Tencent 等众多成熟微博平台, 操作简单, 速度流畅."
                TextWrapping="Wrap"
                Margin="0"
                Style="{StaticResource PhoneTextNormalStyle}" />
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid
            x:Name="ContentPanel"
            Grid.Row="1"
            Margin="12,0,12,0">
            <Grid.RowDefinitions>
                <RowDefinition
                    Height="Auto" />
                <RowDefinition
                    Height="*" />
            </Grid.RowDefinitions>

            <TextBlock
                x:Name="AuthorTitle"
                Text="作者"
                TextWrapping="Wrap"
                Margin="9,-7,0,0"
                Style="{StaticResource PhoneTextLargeStyle}" />
            <ScrollViewer
                Grid.Row="1"
                HorizontalScrollBarVisibility="Auto"
                VerticalScrollBarVisibility="Disabled">
                <ListBox
                    x:Name="AuthorList"
                    ItemsSource="{Binding Users}"
                    Height="497"
                    Width="456">
                    <ListBox.Resources>
                        <DataTemplate
                            x:Key="DataTemplate1">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition
                                        Width="Auto" />
                                    <ColumnDefinition
                                        Width="*" />
                                    <ColumnDefinition
                                        Width="Auto" />
                                </Grid.ColumnDefinitions>

                                <Image
                                    VerticalAlignment="Top"
                                    Height="100"
                                    Width="100"
                                    HorizontalAlignment="Left"
                                    Source="{Binding ProfileImageUrl}">
                                    <Image.Clip>
                                        <RectangleGeometry
                                            RadiusX="8"
                                            RadiusY="8"
                                            Rect="0,0,100,100" />
                                    </Image.Clip>
                                </Image>

                                <TextBlock
                                    Grid.Column="1"
                                    Text="这是他(她)发出的最新一条微博... "
                                    TextWrapping="Wrap"
                                    HorizontalAlignment="Left"
                                    VerticalAlignment="Top" />

                                <ToggleButton
                                    Content="Enable"
                                    Grid.Column="2"
                                    HorizontalAlignment="Left"
                                    VerticalAlignment="Top" />
                            </Grid>
                        </DataTemplate>
                    </ListBox.Resources>
                    <ListBox.ItemTemplate>
                        <StaticResource
                            ResourceKey="DataTemplate1" />
                    </ListBox.ItemTemplate>

                </ListBox>
            </ScrollViewer>
        </Grid>
    </Grid>
</phone:PhoneApplicationPage>
